<template>
 <div>
        <h2>添加分类</h2>
        分类名称：<input type="text" v-model="name">
 </div>
</template>

<script>
 export default {
   data () {
     return {
         name:''
     }
   },
   methods: {
       add_cate(){
         let formdata=new FormData();
         formdata.append("name",this.name);
         this.axios({
           url:'http://127.0.0.1:8000/app01/cate/',
           method:'post',
           data:formdata
         }).then(res=>{
           alert(res.data.msg)
         })
       }
   }
 }
</script>

<style>

 
</style>
